<template>
	<view>
		<view class="bang_puop">
			<view class="title u-m-t-40">
				<image src="../../static/common/logo.png" mode=""></image>
			</view>
			<button type="primary" class="bang_btn" open-type="getUserInfo" @click="get_user_info">微信登录</button>
		</view>
	</view>
</template>

<script>
	import {
		wxAuthLogin,
		toLinkAfterLogin
	} from '@/common/function/wx_login.js'
	import _hook from '@/common/libs/hook.js'

	import {
		mpLogin,
		updateUserInfo
	} from '@/common/function/api_fun.js'
	export default {
		data() {
			return {

			};
		},
		onLoad() {

		},
		methods: {
			get_user_info(e) {
				wxAuthLogin({
					desc: '完善会员资料'
				}).then((option) => {

					updateUserInfo(option).then((res) => {
						// this.$u.vuex('vuex_user_id', res.id)
						// _hook.fire('wxLoginFun');
						// uni.setStorageSync('token', res.token)
						toLinkAfterLogin();
					})
				}).catch((err) => {

				})
			}
		}
	}
</script>

<style>
	page {}

	.bang_puop {
		display: flex;
		flex-direction: column;
		position: fixed;
		z-index: 100;
		top: 0;
		left: 0;
		bottom: 0;
		right: 0;
		align-items: center;
	}

	.bang_btn {
		width: 670rpx;
		height: 90rpx;
		line-height: 90rpx;
		background: #fa3534 !important;
		border-radius: 8rpx;
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #fff !important;
		margin-top: 120rpx;
	}

	button::after {
		border: 0;
	}

	.title {
		display: flex;
		width: 750rpx;
		height: 400rpx;
		justify-content: center;
		align-items: flex-end;
		font-size: 50rpx;
		font-weight: bold;
	}

	.title image {
		width: 200rpx;
		height: 200rpx;
	}
</style>
